package cn.sheep.violet.config

import java.util.Properties

import com.typesafe.config.{Config, ConfigFactory}

/** 这是一个解析配置文件的类
  * author: old sheep
  * QQ: 64341393 
  * Created 2018/10/15
  */
object ConfigHandler {

    private val applicationFile: Config = ConfigFactory.load()

    val parquetFilePath = applicationFile.getString("parquet.file.path")

    val appdictFilePath = applicationFile.getString("appdict.file.path")

    val driverClass = applicationFile.getString("jdbc.driverClass")
    val url = applicationFile.getString("jdbc.url")
    val usernanme = applicationFile.getString("jdbc.user")
    val password = applicationFile.getString("jdbc.password")

    val props = new Properties()
    props.setProperty("driver", driverClass)
    props.setProperty("user", usernanme)
    props.setProperty("password", password)

    val jedisHost = applicationFile.getString("jedis.host")
    val jedisPort = applicationFile.getInt("jedis.port")

}
